using System;
using System.Collections.Generic;

namespace Elephant.Framework
{
    public interface IEntityComponentCollection : ICollection<EntityComponent>
    {
        void Add(EntityComponent item, bool overwrite);
        T Find<T>() where T : EntityComponent;
        List<T> FindAll<T>() where T : EntityComponent;
        bool Contains<T>() where T : EntityComponent;
        bool Remove<T>() where T : EntityComponent;
        bool RemoveImmediate<T>(bool updateDependencies) where T : EntityComponent;
        bool RemoveImmediate(EntityComponent component, bool updateDependencies);
        EntityComponent this[Type key] { get; }

        event EventHandler<EntityComponentEventArgs> ComponentAdded;
        event EventHandler<EntityComponentRemovedEventArgs> ComponentRemoved;
    }
}
